Integrand size = 29, antiderivative size = 240 \[ \int \frac {(f+g x)^2}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {(e f-d g)^2 \text {arctanh}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\left (c d^2-b d e+a e^2\right )^{3/2}} \]
[Out]
Time = 0.19 (sec) , antiderivative size = 240, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {1660, 12, 738, 212} \[ \int \frac {(f+g x)^2}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\frac {(e f-d g)^2 \text {arctanh}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{\left (a e^2-b d e+c d^2\right )^{3/2}}+\frac {2 \left (-x \left (c (2 a g (2 e f-d g)-b f (2 d g+e f))+b g^2 (b d-a e)+2 c^2 d f^2\right )-b \left (a g (d g+2 e f)+c d f^2\right )+2 a \left (a e g^2-c f (e f-2 d g)\right )+b^2 e f^2\right )}{\left (b^2-4 a c\right ) \sqrt {a+b x+c x^2} \left (a e^2-b d e+c d^2\right )} \]
[In]
[Out]
Rule 12
Rule 212
Rule 738
Rule 1660
Rubi steps \begin{align*} \text {integral}& = \frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}-\frac {2 \int -\frac {\left (b^2-4 a c\right ) (e f-d g)^2}{2 \left (c d^2-b d e+a e^2\right ) (d+e x) \sqrt {a+b x+c x^2}} \, dx}{b^2-4 a c} \\ & = \frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {(e f-d g)^2 \int \frac {1}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{c d^2-b d e+a e^2} \\ & = \frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}-\frac {\left (2 (e f-d g)^2\right ) \text {Subst}\left (\int \frac {1}{4 c d^2-4 b d e+4 a e^2-x^2} \, dx,x,\frac {-b d+2 a e-(2 c d-b e) x}{\sqrt {a+b x+c x^2}}\right )}{c d^2-b d e+a e^2} \\ & = \frac {2 \left (b^2 e f^2+2 a \left (a e g^2-c f (e f-2 d g)\right )-b \left (c d f^2+a g (2 e f+d g)\right )-\left (2 c^2 d f^2+b (b d-a e) g^2+c (2 a g (2 e f-d g)-b f (e f+2 d g))\right ) x\right )}{\left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {(e f-d g)^2 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{\left (c d^2-b d e+a e^2\right )^{3/2}} \\ \end{align*}
Time = 1.15 (sec) , antiderivative size = 244, normalized size of antiderivative = 1.02 \[ \int \frac {(f+g x)^2}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=2 \left (\frac {-2 a^2 e g^2+2 c^2 d f^2 x-2 a c d g (2 f+g x)+2 a c e f (f+2 g x)+a b g (2 e f+d g-e g x)+b^2 \left (-e f^2+d g^2 x\right )+b c f (-e f x+d (f-2 g x))}{\left (b^2-4 a c\right ) \left (-c d^2+e (b d-a e)\right ) \sqrt {a+x (b+c x)}}+\frac {\sqrt {-c d^2+b d e-a e^2} (e f-d g)^2 \arctan \left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+x (b+c x)}}{\sqrt {-c d^2+e (b d-a e)}}\right )}{\left (c d^2+e (-b d+a e)\right )^2}\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(554\) vs. \(2(230)=460\).
Time = 0.77 (sec) , antiderivative size = 555, normalized size of antiderivative = 2.31
method | result | size |
default | \(-\frac {g \left (\frac {2 d g \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}-\frac {4 e f \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}-e g \left (-\frac {1}{c \sqrt {c \,x^{2}+b x +a}}-\frac {b \left (2 c x +b \right )}{c \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}\right )\right )}{e^{2}}+\frac {\left (d^{2} g^{2}-2 d e f g +e^{2} f^{2}\right ) \left (\frac {e^{2}}{\left (e^{2} a -b d e +c \,d^{2}\right ) \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}-\frac {\left (b e -2 c d \right ) e \left (2 c \left (x +\frac {d}{e}\right )+\frac {b e -2 c d}{e}\right )}{\left (e^{2} a -b d e +c \,d^{2}\right ) \left (\frac {4 c \left (e^{2} a -b d e +c \,d^{2}\right )}{e^{2}}-\frac {\left (b e -2 c d \right )^{2}}{e^{2}}\right ) \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}-\frac {e^{2} \ln \left (\frac {\frac {2 e^{2} a -2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}\, \sqrt {\left (x +\frac {d}{e}\right )^{2} c +\frac {\left (b e -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{\left (e^{2} a -b d e +c \,d^{2}\right ) \sqrt {\frac {e^{2} a -b d e +c \,d^{2}}{e^{2}}}}\right )}{e^{3}}\) | \(555\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 990 vs. \(2 (230) = 460\).
Time = 3.33 (sec) , antiderivative size = 2023, normalized size of antiderivative = 8.43 \[ \int \frac {(f+g x)^2}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {(f+g x)^2}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\int \frac {\left (f + g x\right )^{2}}{\left (d + e x\right ) \left (a + b x + c x^{2}\right )^{\frac {3}{2}}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {(f+g x)^2}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 773 vs. \(2 (230) = 460\).
Time = 0.29 (sec) , antiderivative size = 773, normalized size of antiderivative = 3.22 \[ \int \frac {(f+g x)^2}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=-\frac {2 \, {\left (\frac {{\left (2 \, c^{3} d^{3} f^{2} - 3 \, b c^{2} d^{2} e f^{2} + b^{2} c d e^{2} f^{2} + 2 \, a c^{2} d e^{2} f^{2} - a b c e^{3} f^{2} - 2 \, b c^{2} d^{3} f g + 2 \, b^{2} c d^{2} e f g + 4 \, a c^{2} d^{2} e f g - 6 \, a b c d e^{2} f g + 4 \, a^{2} c e^{3} f g + b^{2} c d^{3} g^{2} - 2 \, a c^{2} d^{3} g^{2} - b^{3} d^{2} e g^{2} + a b c d^{2} e g^{2} + 2 \, a b^{2} d e^{2} g^{2} - 2 \, a^{2} c d e^{2} g^{2} - a^{2} b e^{3} g^{2}\right )} x}{b^{2} c^{2} d^{4} - 4 \, a c^{3} d^{4} - 2 \, b^{3} c d^{3} e + 8 \, a b c^{2} d^{3} e + b^{4} d^{2} e^{2} - 2 \, a b^{2} c d^{2} e^{2} - 8 \, a^{2} c^{2} d^{2} e^{2} - 2 \, a b^{3} d e^{3} + 8 \, a^{2} b c d e^{3} + a^{2} b^{2} e^{4} - 4 \, a^{3} c e^{4}} + \frac {b c^{2} d^{3} f^{2} - 2 \, b^{2} c d^{2} e f^{2} + 2 \, a c^{2} d^{2} e f^{2} + b^{3} d e^{2} f^{2} - a b c d e^{2} f^{2} - a b^{2} e^{3} f^{2} + 2 \, a^{2} c e^{3} f^{2} - 4 \, a c^{2} d^{3} f g + 6 \, a b c d^{2} e f g - 2 \, a b^{2} d e^{2} f g - 4 \, a^{2} c d e^{2} f g + 2 \, a^{2} b e^{3} f g + a b c d^{3} g^{2} - a b^{2} d^{2} e g^{2} - 2 \, a^{2} c d^{2} e g^{2} + 3 \, a^{2} b d e^{2} g^{2} - 2 \, a^{3} e^{3} g^{2}}{b^{2} c^{2} d^{4} - 4 \, a c^{3} d^{4} - 2 \, b^{3} c d^{3} e + 8 \, a b c^{2} d^{3} e + b^{4} d^{2} e^{2} - 2 \, a b^{2} c d^{2} e^{2} - 8 \, a^{2} c^{2} d^{2} e^{2} - 2 \, a b^{3} d e^{3} + 8 \, a^{2} b c d e^{3} + a^{2} b^{2} e^{4} - 4 \, a^{3} c e^{4}}\right )}}{\sqrt {c x^{2} + b x + a}} + \frac {2 \, {\left (e^{2} f^{2} - 2 \, d e f g + d^{2} g^{2}\right )} \arctan \left (-\frac {{\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} e + \sqrt {c} d}{\sqrt {-c d^{2} + b d e - a e^{2}}}\right )}{{\left (c d^{2} - b d e + a e^{2}\right )} \sqrt {-c d^{2} + b d e - a e^{2}}} \]
[In]
[Out]
Timed out. \[ \int \frac {(f+g x)^2}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx=\int \frac {{\left (f+g\,x\right )}^2}{\left (d+e\,x\right )\,{\left (c\,x^2+b\,x+a\right )}^{3/2}} \,d x \]
[In]
[Out]